<div id="column-right">
    <?php echo $this->element('sidebar'); ?>
</div>
<?php $user = $this->Session->read('user'); ?>
<div id="content"><div class="account-index">
        <h2>Customer Account:  <?php echo $user['User']['fullname']; ?></h2>

        <ul>
            <li><a href="<?php echo DOMAIN; ?>User/user_panel"><img src="images/identity.png">Account Information</a></li>
            <li>Here you can update your billing information.</li>
        </ul>
        <ul>
            <li><a href="<?php echo DOMAIN; ?>User/user_panel"><img src="images/web.png">Shipping Information </a></li>
            <li>Here you can add and maintain shipping addresses. </li>
        </ul>
        <ul>
            <li style="font-weight:bold;margin-bottom:10px"><img src="images/package.png">Order Information </li>
            <li>
                <form action="index.php?route=account/account" method="post">
                    <input name="order_id" type="text" value="" style="padding:6px 2px;width:225px;">
                    <input type="submit" value="Search" name="search" class="black button" style="float:none;height:30px;">
                </form>
                <?php if(!empty($list_order)){ foreach($list_order as $key => $value){ ?>
                <div class="order-list">
                    <div class="order-content">
                        <div>
                            <?php echo $this->Html->link(
                                $this->Html->image(DOMAIN.'images/goto.png', array('alt' => 'button_view', 'title' => 'button_view')).' View',
                                array('controller' => 'User', 'action' => 'order', $value['Order']['id']),
                                array('escape' => false, 'title' => 'View this order')
                            ); ?>
                        </div>
                        <div><b>Order Date:</b> <?php echo $value['Order']['created'];?><br>
                            <b>Total:</b> <?php echo $value['Order']['total_amount']; ?>        </div>
                        <div><b>Order Status:</b> <?php
                            if($value['Order']['payment_status'] == '1') echo 'Completed';
                            else if($value['Order']['payment_status'] == '2') echo 'Failed';
                            else echo 'Pedding';
                            ?><br>
                            <b>Order Number:</b> #<?php echo $value['Order']['id']; ?>        </div>

                    </div>
                </div>
                <?php } } ?>
            </li>
        </ul>

    </div>

</div>

